#pragma once

#include	<redis++.h>
#include	<SQL.h>
#include	<Singleton.h>

#define		GService	DBFlushService::Instance()

class DBFlushService : public ISingleton<DBFlushService> {
public:
	DBFlushService() : _db(), _redis() {}
	virtual ~DBFlushService() {}

	bool Initialize(class IniFile & conf);
	void Breath();
	void Quit();

private:
	bool __Flush();

private:
	SQL::Database _db;
	Redis::Simple _redis;
};